﻿using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace Journeo_backend.Models.Domain
{
    [Table("attraction_comments")]
    public class AttractionComment
    {
        [Key]
        public long CommentId { get; set; }

        [Required]
        public long AttractionId { get; set; }

        [Required]
        public long UserId { get; set; }

        [Required]
        [MaxLength(400)]
        public string Content { get; set; }

        public List<string>? ImageUrls { get; set; }

        public long LikeCount { get; set; } = 0;

        public DateTime CreatedAt { get; set; } = DateTime.Now;

        [ForeignKey("AttractionId")]
        public Attraction? Attraction { get; set; }

        [ForeignKey("UserId")]
        public User? User { get; set; }
    }
}
